// 添加活动的请求
export function addActivity(data) {
    return fetch("https://api.hiehie.top:6001/manage", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            update: false,
        },
        body: JSON.stringify(data),
    });
}
// 请求活动数据
export function activityList() {
    return fetch("https://api.hiehie.top:6001/manage").then((res) => res.json());
}
// 编辑活动
export function editActivity(data) {
    console.log(data);
    return fetch("https://api.hiehie.top:6001/manage/", {
        method: "post",
        headers: {
            "Content-Type": "application/json",
            update: true,
        },
        body: JSON.stringify(data),
    });
}
// 删除活动
export function delActivity(id) {
    console.log(id);
    return fetch("https://api.hiehie.top:6001/manage/" + id, {
        method: "DELETE",
    });
}
//上传图片
export function uploadImg(data) {
    
    return fetch('https://api.hiehie.top:6001/upload',{
        method:'post',
        body:data
    })
    
}